<template>
    <div class="change-select-key">
      <el-form ref="form" :model="form" label-width="100px">
        <el-form-item label="蜀国五虎将：">
          <el-select v-model="form.region" placeholder="请选择五虎将名字">
            <el-option
              v-for="(item, value) in nameOptions"
              :label="item.label"
              :value="item.value"
              :key="item.value"
            ></el-option>
          </el-select>
        </el-form-item>
      </el-form>
    </div>
  </template>
  
  <script>
  export default {
    data() {
      return {
        form: {
          name: "",
        },
        nameOptions: [
          { decsName: "赵云", decsValue: "1" },
          { decsName: "关羽", decsValue: "2" },
          { decsName: "张飞", decsValue: "3" },
        ],
      };
    },
    methods: {},
    created() {},
    mounted() {
      const arr = this.nameOptions.map(item => {
        return{
          label:item.decsName,
          value:item.decsValue
        }
  
      })
      this.nameOptions = arr;
      
    },
  };
  </script>
  <style scoped></style>
  